package com.lida.demo;

import com.alibaba.excel.EasyExcel;

import java.awt.*;
import java.util.ArrayList;
import java.util.List;

public class easyExcel {

    public static void main(String[] args){
        String fileName="D:\\A\\Excel\\test.xlsx";

        List<detailedData> list= new ArrayList<detailedData>();
        for(int i=0; i<10;i++){
            detailedData data =new detailedData();
            String a=String.valueOf(i);
            String b=String.valueOf(i+1);
            data.setId(a);
            data.setTitle(b);
            list.add(data);
        }

        EasyExcel.write(fileName,detailedData.class).sheet("test").doWrite(list);
    }
}
